package com.forage.exp.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum GlobalErrorEnum {

    UNKNOWN_EXCEPTION("GE001","未知异常："),

    AUTHENTICATION_EXCEPTION("GE400","认证异常："),
    AUTHORITY_EXCEPTION("GE401","权限异常："),
    BUSINESS_EXCEPTION("GE402","业务异常："),
    MAIL_EXCEPTION("GE403","邮件异常："),

    CLASS_CAST_EXCEPTION("GE002","系统异常：类型强制转换异常"),
    ARITHMETIC_EXCEPTION("GE002","系统异常：算术条件异常"),
    NULL_POINTER_EXCEPTION("GE002","系统异常：空指针异常"),
    NUMBER_FORMAT_EXCEPTION("GE002","系统异常：字符串转换为数字异常"),
    ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION("GE007","系统异常：数组下标越界异常"),
    NO_SUCH_METHOD_EXCEPTION("GE002","系统异常：方法未找到异常"),
    NO_CLASS_DEF_FOUND_ERROR("GE002","系统异常：未找到类定义错误"),
    CLASS_NOT_FOUND_EXCEPTION("GE002","系统异常：找不到类异常"),
    INDEX_OUT_OF_BOUNDS_EXCEPTION("GE002","系统异常：索引越界异常");

    /**
     * 错误码
     */
    private final String code;

    /**
     * 错误信息
     */
    private final String message;

}
